;;
;// Instructions
;// The file contents two main parts:
;//  - macro definitions
;//  - universal scripts
;//////////////////////////////////////////////////////////
;// Part 1 - macro definitions
;//////////////////////////////////////////////////////////
;// All macros are placed here to avoid a need to have an *.h file
;// You may delete and add any macros you want. The main rule is
;// that the macro should be defined before any use.
;// Pay attantion to the section "RMG Types". You may use only 
;// objects that are mentioned there.
;// Any definition there means ANY object of a type. So if you have,
;// say 5 random towns, and have a script for ANY_TOWN object, so 
;// all 5 towns will have this script.
;/********** EVENT_TYPE **********/
;#define MAP_TIMED 1
;#define MAP_TRIGGERED 2
;#define MAP_CONTINUOUS 3
;#define MAP_PLACED 4
;#define ARMY_TIMED 5
;#define ARMY_TRIGGERED 6
;#define ARMY_CONTINUOUS 7
;#define OBJECT_TRIGGERED_EVENT 8
;#define OBJECT_TIMED_EVENT 9
;#define OBJECT_CONTINUOUS_EVENT 10
;#define OBJECT_STD_ATTACKED_EVENT 11
;#define OBJECT_STD_CAPTURED_EVENT 12
;#define OBJECT_STD_VICTORIOUS_EVENT 13
;#define OBJECT_STD_ENTERED_EVENT 14
;#define OBJECT_STD_ENCOUNTERED_EVENT 15
;#define OBJECT_STD_DEFEATED_EVENT 16
;#define OBJECT_STD_TRIGGERED_SCRIPT 17
;#define OBJECT_STD_QUESTREQUEST_SCRIPT 18
;#define OBJECT_STD_COMPLETEON_SCRIPT 19
;#define PLACEDEVENT_ACTION 20
;#define BOMB_PLACEHOLDER 21
;/********** EVENT_OBJECT **********/
;/********** RMG Types **********/
;#define  ANY_TOWN        1001
;#define  ANY_MINE        1002
;#define  ANY_ARMY        1003
;#define  ANY_DWELLING    1004
;#define  ANY_LIGHTHOUSE  1005
;#define  ANY_MATGEN      1006
;#define  ANY_START_HERO  1007
;/********** EVENT_WANDER (for armies and monsters) **********/
;#define WANDER_UNDEFINED 1
;#define WANDER_GUARD 2
;#define WANDER_RUN 3
;/********** Color Bits **********/
;#define B_RED 1
;#define B_BLUE 2
;#define B_GREEN 4
;#define B_ORANGE 8
;#define B_PURPLE 16
;#define B_TEAL 32
;#define B_NO_ONE 64
;/********** Players **********/
;#define P_THIS_OWNER 0
;#define P_CURRENT 1
;#define P_OPPOSITE 2
;#define P_RED 3
;#define P_BLUE 4
;#define P_GREEN 5
;#define P_ORANGE 6
;#define P_PURPLE 7
;#define P_TEAL 8
;/********** Colors **********/
;#define S_RED 0
;#define S_BLUE 1
;#define S_GREEN 2
;#define S_ORANGE 3
;#define S_PURPLE 4
;#define S_TEAL 5
;#define S_NO_ONE 6
;/********** Human AI Bits **********/
;#define HUMAN 1
;#define AI 2
;/********** Garrizons / Towns /Army / Hero **********/
;#define THIS_ARMY 0
;#define OPPOSING_ARMY 2
;#define FIRST_HERO_IN_THIS_ARMY 1
;#define FIRST_HERO_IN_GARRISON 2
;#define ANY_HERO_IN_OPPOSING_ARMY 3
;#define MOST_POWERFUL_HERO_IN_THIS_ARMY 4
;#define MOST_POWERFUL_HERO_IN_GARRISON 5
;#define MOST_POWERFUL_HERO_IN_OPPOSING_ARMY 6
;#define LEAST_POWERFUL_HERO_IN_THIS_ARMY 7
;#define LEAST_POWERFUL_HERO_IN_GARRISON 8
;#define LEAST_POWERFUL_HERO_IN_OPPOSING_ARMY 9
;/********** Secondary Skills **********/
;#define SKILL_TACTICS 0
;#define SKILL_COMBAT 1
;#define SKILL_SCOUTING 2
;#define SKILL_NOBILITY 3
;#define SKILL_LIFE_MAGIC 4
;#define SKILL_ORDER_MAGIC 5
;#define SKILL_DEATH_MAGIC 6
;#define SKILL_CHAOS_MAGIC 7
;#define SKILL_NATURE_MAGIC 8
;#define SKILL_OFFENSE 9
;#define SKILL_DEFENSE 10
;#define SKILL_LEADERSHIP 11
;#define SKILL_MELEE 12
;#define SKILL_ARCHERY 13
;#define SKILL_MAGIC_RESISTANCE 14
;#define SKILL_PATHFINDING 15
;#define SKILL_SEAMANSHIP 16
;#define SKILL_STEALTH 17
;#define SKILL_ESTATES 18
;#define SKILL_MINING 19
;#define SKILL_DIPLOMACY 20
;#define SKILL_HEALING 21
;#define SKILL_SPIRITUALITY 22
;#define SKILL_RESURRECTION 23
;#define SKILL_ENCHANTMENT 24
;#define SKILL_WIZARDRY 25
;#define SKILL_CHARM 26
;#define SKILL_OCCULTISM 27
;#define SKILL_DEMONOLOGY 28
;#define SKILL_NECROMANCY 29
;#define SKILL_CONJURATION 30
;#define SKILL_PYROMANCY 31
;#define SKILL_SORCERY 32
;#define SKILL_HERBALISM 33
;#define SKILL_MEDITATION 34
;#define SKILL_SUMMONING 35
;/********** Secondary Skill Levels **********/
;#define BASIC 0
;#define ADVANCED 1
;#define EXPERT 2
;#define MASTER 3
;#define GRANDMASTER 4
;/********** Hero Base Classes **********/
;#define KNIGHT 0
;#define PRIEST 1
;#define LORD 2
;#define MAGE 3
;#define DEATH_KNIGHT 4
;#define NEROMANCER 5
;#define THIEF 6
;#define SORCERER 7
;#define ARCHER 8
;#define DRUID 9
;#define BARBARIAN 10
;#define RANDOM 11
;/********** Gender **********/
;#define FEMALE 0
;#define MALE 1
;#define RANDOM 2
;/********** Duration **********/
;#define UNTIL_NEXT_BATTLE 0
;#define PERMANENT 1
;/********** Creatures **********/
;#define AIR_ELEMENTAL 0
;#define ANGEL 1
;#define BALLISTA 2
;#define BANDIT 3
;#define BEHEMOTH 4
;#define EVIL_EYE 5
;#define BLACK_DRAGON 6
;#define BONE_DRAGON 7
;#define CENTAUR 8
;#define CERBERUS 9
;#define CHAMPION 10
;#define CROSSBOWMAN 11
;#define CRUSADER 12
;#define CYCLOPS 13
;#define VENOM_SPAWN 14
;#define DEVIL 15
;#define DRAGON_GOLEM 16
;#define DWARF 17
;#define EARTH_ELEMENTAL 18
;#define EFREET 19
;#define ELF 20
;#define FAERIE_DRAGON 21
;#define FIRE_ELEMENTAL 22
;#define GARGOYLE 23
;#define GENIE 24
;#define GHOST 25
;#define BERSERKER 26
;#define GOLD_GOLEM 27
;#define GRIFFIN 28
;#define HALFLING 29
;#define HARPY 30
;#define HYDRA 31
;#define ICE_DEMON 32
;#define IMP 33
;#define LEPRECHAUN 34
;#define MAGE 35
;#define MANTIS 36
;#define MEDUSA 37
;#define MERMAIDS 38
;#define MINOTAUR 39
;#define MONK 40
;#define MUMMY 41
;#define NAGA 42
;#define NIGHTMARE 43
;#define NOMAD 44
;#define OGRE_MAGE 45
;#define ORC 46
;#define PEASANT 47
;#define PHOENIX 48
;#define PIKEMAN 49
;#define PIRATE 50
;#define SATYR 51
;#define SEA_MONSTERS 52
;#define SKELETON 53
;#define SQUIRE 54
;#define SPRITE 55
;#define THUNDERBIRD 56
;#define TITAN 57
;#define TROGLODITE 58
;#define TROLL 59
;#define UNICORN 60
;#define VAMPIRE 61
;#define WATER_ELEMENTAL 62
;#define WHITE_TIGER 63
;#define WOLF 64
;#define ZOMBIE 65
;#define WASPWORT 66
;/********** GS Creatures **********/
;#define GOBLIN_KNIGHT 67
;#define EVIL_SORCERESS 68
;#define GARGANTUAN 69
;#define DARK_CHAMPION 70
;/********** WoW Creatures **********/
;#define CATAPULT 71
;#define FRENZIED_GNASHER 72
;#define MEGA_DRAGON 73
;/********** Spells **********/
;#define ANIMATE_DEAD 2
;#define ANTI_MAGIC 3
;#define ARMAGEDDON 4
;#define BANISH 5
;#define BERSERK 6
;#define BIND_WOUND 8
;#define BLESS 10
;#define BLIND 11
;#define BLOOD_FRENZY 12
;#define BLOODLUST 13
;#define SPARKS 14
;#define CANCELLATION 15
;#define HEAVENLY_SHIELD 16
;#define CHAIN_LIGHTNING 17
;#define PHANTOM_IMAGE 18
;#define CLOUD_OF_CONFUSION 19
;#define CONFUSION 21
;#define COWARDICE 22
;#define CURSE 23
;#define DEATH_CALL 24
;#define DISINTEGRATE 26
;#define DISPEL 27
;#define DISPLACEMENT 28
;#define CELESTIAL_ARMOR 29
;#define DIVINE_INTERVENTION 30
;#define DEFENDER 31
;#define HOLY_SHOUT 32
;#define DRAGON_STRENGTH 33
;#define UNHOLY_SONG 34
;#define EXCORTISM 35
;#define AURA_OF_FEAR 36
;#define FIRE_BOLT 39
;#define FIRE_RING 41
;#define FIREBALL 43
;#define FIRE_AURA 44
;#define FIRST_STRIKE 45
;#define FLIGHT 46
;#define FORGETFULNESS 47
;#define FORTUNE 48
;#define GIANT_STRENGTH 51
;#define GUARDIAN_ANGEL 53
;#define HAND_OF_DEATH 54
;#define HASTE 55
;#define HEAL 56
;#define SPIRITUAL_ARMOR 58
;#define RETRIBUTION 59
;#define HOLY_WORD 61
;#define HYPNOTIZE 62
;#define ICE_BOLT 63
;#define CREATE_ILLUSION 64
;#define IMPLOSION 65
;#define INFERNO 66
;#define LIFE_DRAIN 68
;#define LIGHTNING 69
;#define MAGIC_ARROW 71
;#define MAGIC_FIST 72
;#define MAGIC_LEECH 73
;#define MAGIC_MIRROR 74
;#define MANA_FLARE 77
;#define MARTYR 79
;#define MASS_BLESS 80
;#define MASS_CANCELATION 81
;#define MASS_CURSE 82
;#define MASS_DISPEL 83
;#define MASS_EXORTISM 84
;#define MASS_FIRST_STRIKE 85
;#define MASS_FORTUNE 86
;#define MASS_SPEED 87
;#define MASS_HEALING 88
;#define MASS_MISFORTUNE 89
;#define MASS_PRECISION 90
;#define MASS_CHAOS_WARD 91
;#define MASS_DEATH_WARD 92
;#define MASS_NATURE_WARD 93
;#define MASS_ORDER_WARD 94
;#define MASS_SLAYER 95
;#define MASS_SLOW 96
;#define MASS_SNAKE_STRIKE 97
;#define MASS_SORROW 98
;#define MASS_FERVOR 99
;#define MASS_WEAKNESS 100
;#define MIRE 101
;#define MISFORTUNE 102
;#define SPEED 104
;#define SLOW 105
;#define PAIN_MIRROR 106
;#define PATHFINDING 108
;#define BLUR 109
;#define PLAGUE 110
;#define POISON 111
;#define POWER_DRAIN 113
;#define PRAYER 114
;#define PRECISION 115
;#define CHAOS_WARD 117
;#define DEATH_WARD 118
;#define NATURE_WARD 120
;#define ORDER_WARD 121
;#define QUICKSAND 123
;#define RAISE_GHOST 124
;#define RAISE_SCELETONS 125
;#define RAISE_VAMPIRES 126
;#define MASS_BLUR 127
;#define DISRUPTING_RAY 128
;#define CAT_REFLEXES 130
;#define REGENERATION 131
;#define NECROMANCY_WARD 135
;#define SACRIFICE 136
;#define SANCTUARY 137
;#define SLAYER 140
;#define FATIGUE 141
;#define SNAKE_STRIKE 143
;#define SONG_OF_PEACE 144
;#define SORROW 145
;#define SPELL_SHACKLE 147
;#define MIRTH 148
;#define STEAL_ALL_ENCHANTMENTS 149
;#define STEAL_ENCHANTMENT 150
;#define STONESKIN 151
;#define SUMMON_ELF 155
;#define SUMMON_WHITE_TIGER 156
;#define SUMMON_AIR_ELEMENTAL 157
;#define SUMMON_SHIP 158
;#define SUMMON_EARTH_ELEMENTAL 163
;#define SUMMON_FAERIE_DRAGON 164
;#define SUMMON_FIRE_ELEMENTAL 165
;#define SUMMON_GRIFFIN 166
;#define SUMMON_LEPRECHAUN 169
;#define SUMMON_MANTIS 170
;#define SUMMON_PHOENIX 171
;#define SUMMON_SATIR 172
;#define SUMMON_SPRITE 173
;#define WASP_SWARM 174
;#define SUMMON_UNICORN 175
;#define SUMMON_WATER_ELEMENTAL 176
;#define SUMMON_WOLF 177
;#define TELEPORT 178
;#define TERRAIN_WALK 179
;#define TOWN_GATE 181
;#define VAMPIRIC_TOUCH 182
;#define VISIONS 183
;#define WEAKNESS 185
;#define SUMMON_WASPWORT 187
;/********** Others **********/
;#define TRUE  f_True()
;#define FALSE f_False()
;#define YES   1
;#define NO    0
;#define BOMB  char
;//////////////////////////////////////////////////////////
;// Part 2 All universal scripts (RMGScripts)
;//////////////////////////////////////////////////////////
;// First set the map number
;// For now only first map (0) is supported
;/* Map0 */
;#define MAP_NUMBER 0
;// You may have up to 200 RMGScripts
;// Now come to the first RMGScript
;// Let us include it from external file. If you do not like any script,
;// you can just delete the include instruction
;#include RMGDemoScript1.c
;#include RMGDemoScript1.c
;         ^- open failure on include file
;// check this included file - you will find some instructions there
;// Now write a second script that whould make sense for AI
;//////////////////////////////////////////////////////////
;// RMGScript #2
;// Again needed defenitions
;#define RMG_SCRIPT_NUMBER  2
;#define RMG_SCRIPT_DEFAULT YES
;#define RMG_SCRIPT_VARNAME "SecondScriptIsTurnedOn"
;int SecondScriptIsTurnedOn;
;#define RMG_SCRIPT_NAME "Mine/Town/Army enter/win AI speed boost"
;#define RMG_SCRIPT_DESCRIPTION    "  An AI Army gets additional movement points when it visits any kind of mine, towns or defeats any monster stack on the map (placed at map generation not later).\r\n  The bonus is about 20 additional squares."
;/********** Any Mine **********/
;// Attach the script to all mines on the map
;#define EVENT_OBJECT     ANY_MINE
;/*** Standard Object Event ***/
;#define EVENT_TYPE       OBJECT_STD_ENTERED_EVENT
;#define EVENT_WHOM       B_RED + B_BLUE + B_GREEN + B_ORANGE + B_PURPLE + B_TEAL + B_NO_ONE
;// enable it for AI + HUMAN (real control in the script)
;#define EVENT_HUMANAI    HUMAN+AI 
;#define EVENT_GOLD       0
;#define EVENT_WOOD       0
;#define EVENT_ORE        0
;#define EVENT_CRYSTAL    0
;#define EVENT_SULFUR     0
;#define EVENT_MERCURY    0
;#define EVENT_GEMS       0
;#define EVENT_MESSAGE    ""
;/*********************************/
;// This is a standard type of object script and may have only the name "ScriptBody"
;ScriptBody(){
;  // If our script is enabled
;  if(SecondScriptIsTurnedOn==1){
;    // If Player is an AI
;   if(f_IsComputer(0)){
;    // Add some movement point - about 30 extra squres
;// There is a bug in the script interpretter and the NWC programmers 
;// have forgotten to multily the value to 100, so we need to use 
;// such an "ugly" way to realize it.
;// Moreover, the WoW editor will crush any time you will try 
;// to check the script body. The only good news is that it 
;// works in the game :-)
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;// Show the message that it happens so you can check it
;//    f_Text("Boost your movement!");
;   }
;  }
;}
;/********** Any Town **********/
;// Attach the script to all towns on the map
;#define EVENT_OBJECT     ANY_TOWN
;#define EVENT_TYPE       OBJECT_STD_ENTERED_EVENT
;#define EVENT_WHOM       B_RED + B_BLUE + B_GREEN + B_ORANGE + B_PURPLE + B_TEAL + B_NO_ONE
;// enable it for AI + HUMAN (real control in the script)
;#define EVENT_HUMANAI    HUMAN+AI 
;#define EVENT_GOLD       0
;#define EVENT_WOOD       0
;#define EVENT_ORE        0
;#define EVENT_CRYSTAL    0
;#define EVENT_SULFUR     0
;#define EVENT_MERCURY    0
;#define EVENT_GEMS       0
;#define EVENT_MESSAGE    ""
;/*********************************/
;// This is a standard type of object script and may have only the name "ScriptBody"
;ScriptBody(){
;  // If our script is enabled
;  if(SecondScriptIsTurnedOn==1){
;    // If Player is an AI
;   if(f_IsComputer(0)){
;    // Add some movement point - about 30 extra squres
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;   }
;  }
;}
;/********** Any Army **********/
;#define EVENT_OBJECT     ANY_ARMY
;// If this army is defeated, give movement points to winer
;#define EVENT_TYPE       OBJECT_STD_DEFEATED_EVENT
;#define EVENT_WHOM       B_RED + B_BLUE + B_GREEN + B_ORANGE + B_PURPLE + B_TEAL + B_NO_ONE
;// enable it for AI + HUMAN (real control in the script)
;#define EVENT_HUMANAI    HUMAN+AI 
;#define EVENT_GOLD       0
;#define EVENT_WOOD       0
;#define EVENT_ORE        0
;#define EVENT_CRYSTAL    0
;#define EVENT_SULFUR     0
;#define EVENT_MERCURY    0
;#define EVENT_GEMS       0
;#define EVENT_MESSAGE    ""
;/*********************************/
;// This is a standard type of object script and may have only the name "ScriptBody"
;ScriptBody(){
;  // If our script is enabled
;  if(SecondScriptIsTurnedOn==1){
;    // If Opposing Army is AI
;   if(f_IsComputer(2)){
;    // Add some movement point - about 30 extra squres
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;    f_IncCurMove(OPPOSING_ARMY,50); f_IncCurMove(OPPOSING_ARMY,50);
;   }
;  }
;}
;//////////////////////////////////////////////////////////
;// RMGScript #3
;#define RMG_SCRIPT_NUMBER  3
;#define RMG_SCRIPT_DEFAULT YES
;#define RMG_SCRIPT_VARNAME "ThirdScriptIsTurnedOn"
;int ThirdScriptIsTurnedOn;
;#define RMG_SCRIPT_NAME "Start up AI Hero(Army) speed boost"
;#define RMG_SCRIPT_DESCRIPTION    "  A start up AI Hero and hence an Army get additional movement points at any Continuous event (often enough).\r\n  The bonus is about 6 additional squares.\r\n  Warning! This script may slow down AI player turns."
;/********** Any Start Hero **********/
;#define EVENT_OBJECT     ANY_START_HERO
;// Any Cont event will give this army additional movement points
;#define EVENT_TYPE       ARMY_CONTINUOUS
;#define EVENT_NUMBER     -1
;#define EVENT_NAME       "AIContArmyScript"
;#define EVENT_WHOM       B_RED + B_BLUE + B_GREEN + B_ORANGE + B_PURPLE + B_TEAL + B_NO_ONE
;// enable it for AI
;#define EVENT_HUMANAI    AI // change it to AI only
;// Run it at Owner turns only
;#define EVENT_OWNER_TURN YES
;/*********************************/
;// This is a standard type of object script and may have only the name "ScriptBody"
;AIContArmyScript(){
;  // If our script is enabled
;  if(ThirdScriptIsTurnedOn==1){
;    // Add some movement point - about 6 extra squres
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;    f_IncCurMove(THIS_ARMY,50); f_IncCurMove(THIS_ARMY,50);
;  }
;}
;//////////////////////////////////////////////////////////
;// RMGScript #4
;#define RMG_SCRIPT_NUMBER  4
;#define RMG_SCRIPT_DEFAULT YES
;#define RMG_SCRIPT_VARNAME "Script4IsTurnedOn"
;int Script4IsTurnedOn;
;#define RMG_SCRIPT_NAME "Start up AI Hero battle boost"
;#define RMG_SCRIPT_DESCRIPTION    "  A start up AI Hero gets the next bonuses at any battle with neutral stacks:\r\n+99 Attack  (temporal) \r\n+99 Defense (temporal) \r\n+1000/3000/5000/10000 Experience since first/second/third/fifth week (permanent :-)\r\n  After the battle all statistics but experience get back."
;/********** Any Start Hero **********/
;#define EVENT_OBJECT     ANY_START_HERO
;// Called before any battle
;#define EVENT_TYPE       OBJECT_STD_ENCOUNTERED_EVENT
;#define EVENT_WHOM       B_RED + B_BLUE + B_GREEN + B_ORANGE + B_PURPLE + B_TEAL + B_NO_ONE
;// enable it for AI
;#define EVENT_HUMANAI    AI // change it to AI only
;#define EVENT_GOLD       0
;#define EVENT_WOOD       0
;#define EVENT_ORE        0
;#define EVENT_CRYSTAL    0
;#define EVENT_SULFUR     0
;#define EVENT_MERCURY    0
;#define EVENT_GEMS       0
;#define EVENT_MESSAGE    ""
;/*********************************/
;// This is a standard type of object script and may have only the name "ScriptBody"
;ScriptBody(){
;  int CurDay;
;  // If our script is enabled
;  if(Script4IsTurnedOn==1){
;    if(f_IsColor(2,6)){ // if opponent is no one's (Gray)
;      // weaker opposing army
;//      f_DecMoral(3,20);
;//      f_DecLuck(3,20);
;      // stronger the current hero for this battle only
;      f_IncDamage(0,99,UNTIL_NEXT_BATTLE); // Attack in reality
;      f_IncMaxHP(0,99,UNTIL_NEXT_BATTLE);  // Defense in reality
;//      f_IncSpeed(0,99,UNTIL_NEXT_BATTLE);
;      CurDay=f_CurDay();
;      if(CurDay>28) f_IncExp(0,10000); // second month
;      else if(CurDay>14) f_IncExp(0,5000); // third and fourth week
;      else if(CurDay>7) f_IncExp(0,3000); // second week
;      else f_IncExp(0,1000); // first week
;    }
;  }
;}
;//////////////////////////////////////////////////////////
;// RMGScript #5
;#define RMG_SCRIPT_NUMBER  5
;#define RMG_SCRIPT_DEFAULT YES
;#define RMG_SCRIPT_VARNAME "Script5IsTurnedOn"
;int Script5IsTurnedOn;
;#define RMG_SCRIPT_NAME "Start up AI Hero Creature boost"
;#define RMG_SCRIPT_DESCRIPTION    "  A start up AI Hero's army gets the next creatures dayly:\r\n+10 Level 1 creatures first week\r\n+6  Level 2 creatures second week\r\n+3  Level 3 creatures third and fourth week\r\n+1  Level 4 creature  second month and later\r\n  All creature are of the Hero's alignment.\r\n  Check the script for particular creatures type."
;/********** Any Start Hero **********/
;#define EVENT_OBJECT     ANY_START_HERO
;// Called before any battle
;#define EVENT_TYPE       ARMY_TIMED
;#define EVENT_WHOM       B_RED + B_BLUE + B_GREEN + B_ORANGE + B_PURPLE + B_TEAL + B_NO_ONE
;// enable it for AI
;#define EVENT_HUMANAI    AI // change it to AI only
;#define EVENT_NAME       "AITimedArmyScript"
;#define EVENT_FIRST_DAY  1
;#define EVENT_PERIOD     1
;#define EVENT_GOLD       0
;#define EVENT_WOOD       0
;#define EVENT_ORE        0
;#define EVENT_CRYSTAL    0
;#define EVENT_SULFUR     0
;#define EVENT_MERCURY    0
;#define EVENT_GEMS       0
;#define EVENT_MESSAGE    ""
;/*********************************/
;AITimedArmyScript(){
;  int CurDay;
;  // If our script is enabled
;  if(Script5IsTurnedOn==1){
;    CurDay=f_CurDay();
;    if(f_HasAlignment(0,0)){ // life
;      if(CurDay>28) f_GiveCreature(THIS_ARMY,ANGEL,1); // second month
;      else if(CurDay>14) f_GiveCreature(THIS_ARMY,MONK,3); // third and fourth week
;      else if(CurDay>7) f_GiveCreature(THIS_ARMY,BALLISTA,6); // second week
;      else f_GiveCreature(THIS_ARMY,CROSSBOWMAN,10); // first week
;    }
;    if(f_HasAlignment(0,1)){ // Order
;      if(CurDay>28) f_GiveCreature(THIS_ARMY,TITAN,1); // second month
;      else if(CurDay>14) f_GiveCreature(THIS_ARMY,GENIE,3); // third and fourth week
;      else if(CurDay>7) f_GiveCreature(THIS_ARMY,MAGE,6); // second week
;      else f_GiveCreature(THIS_ARMY,HALFLING,10); // first week
;    }
;    if(f_HasAlignment(0,2)){ // Death
;      if(CurDay>28) f_GiveCreature(THIS_ARMY,DEVIL,1); // second month
;      else if(CurDay>14) f_GiveCreature(THIS_ARMY,VAMPIRE,3); // third and fourth week
;      else if(CurDay>7) f_GiveCreature(THIS_ARMY,GHOST,6); // second week
;      else f_GiveCreature(THIS_ARMY,IMP,10); // first week
;    }
;    if(f_HasAlignment(0,3)){ // Chaos
;      if(CurDay>28) f_GiveCreature(THIS_ARMY,BLACK_DRAGON,1); // second month
;      else if(CurDay>14) f_GiveCreature(THIS_ARMY,EFREET,3); // third and fourth week
;      else if(CurDay>7) f_GiveCreature(THIS_ARMY,MEDUSA,6); // second week
;      else f_GiveCreature(THIS_ARMY,ORC,10); // first week
;    }
;    if(f_HasAlignment(0,4)){ // Nature
;      if(CurDay>28) f_GiveCreature(THIS_ARMY,FAERIE_DRAGON,1); // second month
;      else if(CurDay>14) f_GiveCreature(THIS_ARMY,GRIFFIN,3); // third and fourth week
;      else if(CurDay>7) f_GiveCreature(THIS_ARMY,ELF,6); // second week
;      else f_GiveCreature(THIS_ARMY,WOLF,10); // first week
;    }
;    if(f_HasAlignment(0,5)){ // Might
;      if(CurDay>28) f_GiveCreature(THIS_ARMY,THUNDERBIRD,1); // second month
;      else if(CurDay>14) f_GiveCreature(THIS_ARMY,CYCLOPS,3); // third and fourth week
;      else if(CurDay>7) f_GiveCreature(THIS_ARMY,HARPY,6); // second week
;      else f_GiveCreature(THIS_ARMY,CENTAUR,10); // first week
;    }
;  }
;}
;//////////////////////////////////////////////////////////
;// RMGScript #6
;#define RMG_SCRIPT_NUMBER  6
;#define RMG_SCRIPT_DEFAULT YES
;#define RMG_SCRIPT_VARNAME "Script6IsTurnedOn"
;int Script6IsTurnedOn;
;#define RMG_SCRIPT_NAME "AI Resource boost"
;#define RMG_SCRIPT_DESCRIPTION "AI players get dayly:\r\n+5000 Gold\r\n+5    Wood\r\n+5    Ore\r\n+2    Crystals\r\n+2    Sulfur\r\n+2    Mercury\r\n+2    Gems"
;/********** Timed Event # **********/
;#define EVENT_TYPE       MAP_TIMED
;#define EVENT_NUMBER     -1
;#define EVENT_NAME       "AIResourceScript"
;#define EVENT_WHOM       B_RED + B_BLUE + B_GREEN + B_ORANGE + B_PURPLE + B_TEAL
;#define EVENT_HUMANAI    AI
;#define EVENT_FIRST_DAY  1
;#define EVENT_PERIOD     1
;// Resources
;#define EVENT_GOLD       0
;#define EVENT_WOOD       0
;#define EVENT_ORE        0
;#define EVENT_CRYSTAL    0
;#define EVENT_SULFUR     0
;#define EVENT_MERCURY    0
;#define EVENT_GEMS       0
;#define EVENT_MESSAGE    ""
;/*********************************/
;AIResourceScript(){
;  if(Script6IsTurnedOn==YES){
;    f_GiveMaterial(P_CURRENT, 5000,5,5,2,2,2,2); /* Gold, Wood, Ore, Crystal, Sulfur, Mercury, Gems */
;  }
;}
;//////////////////////////////////////////////
;// Now it is your turn to add universal scripts
